package org.quincy.rock.core.os;

import org.quincy.rock.core.vo.Vo;

import oshi.hardware.CentralProcessor.ProcessorIdentifier;

/**
 * <b>CPU标识信息。</b>
 * <p><b>详细说明：</b></p>
 * <!-- 在此添加详细说明 -->
 * 无。
 * 
 * @version 1.0
 * @author quincy
 * @since 1.0
 */
public class CpuIdentifier extends Vo<String> {
	/**
	 * 
	 */
	private static final long serialVersionUID = 4464910772044865313L;
	
	private ProcessorIdentifier pi;	
	
	/**
	 * 逻辑处理器数量
	 */
	private int logicalProcessorCount;	
	/**
	 * 物理处理器数量
	 */
	private int physicalProcessorCount;
	
	CpuIdentifier(ProcessorIdentifier pi){
		this.pi=pi;
	}
	
	@Override
	public String id() {
		return pi.getIdentifier();
	}

	public String getId() {
		return pi.getIdentifier();
	}
	
	public boolean isCpu64bit() {
		return pi.isCpu64bit();
	}
	
	public String getName() {
		return pi.getName();
	}
	
	public int getLogicalProcessorCount() {
		return logicalProcessorCount;
	}

	public void setLogicalProcessorCount(int logicalProcessorCount) {
		this.logicalProcessorCount = logicalProcessorCount;
	}

	public int getPhysicalProcessorCount() {
		return physicalProcessorCount;
	}

	public void setPhysicalProcessorCount(int physicalProcessorCount) {
		this.physicalProcessorCount = physicalProcessorCount;
	}

	@Override
	public String toString() {
		return pi.toString();
	}
}
